home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / DO1002.ARJ / CLEAR.SCR < prev    next >
Text File  |  1991-12-04  |  1KB  |  46 lines

  1. .pg wi full clr cy
  2.     COMMAND NAME»gray«: »%t« ClearVariables »ye«
  3.  
  4.     /CLEAR [ALL|CURRENT|{variable}]
  5. /cw
  6.  
  7.     Because variables take up memory, in larger scripts or scripts
  8.     executed from other scripts, you may wish to delete the variables
  9.     from memory as appropriate. The »%t«ClearVariables»#« command
  10.     accomplishes this.
  11.  
  12.     It can be issued with one of three parameters:
  13.  
  14.     »cy«ALL»#«        Clears »ye«ALL»#« variables.  This includes any variables set
  15.                in the »ma«DO.CFG»#« script. This command is normally issued
  16.                only when running »%t«DO»#« in interactive mode.
  17.  
  18.     »cy«CURRENT»#«    Clears all variables created by the »wh«current script»#«.
  19.  
  20.     »cy«{variable}»#« Clears the named variable.
  21. .pg clr
  22.     Here are some examples.
  23.     Press »bo«<enter>»#« to execute each of the commands.
  24.  
  25.     First let's set three variables:
  26.  
  27. |/SET V1 1111111111
  28. |/SET V2 2222222222
  29. |/SET V3 3333333333
  30. /GOSUB DispVars
  31.     Now let's clear variable V1 [%V1]
  32. |/CLEAR V1
  33. /GOSUB DispVars
  34. /VERSION
  35.     Now let's clear all variables created by this script:
  36. |/CLEAR CURRENT
  37. :DispVars
  38. .reset
  39.  
  40.     V1 = [%V1]
  41.     V2 = [%V2]
  42.     V3 = [%V3]
  43.  
  44. /RETURN
  45. /ENDEXEC CLEAR
  46.